﻿using System.Collections.Generic;

namespace SIR.Common.Condition
{
	/// <summary>
	/// Defines a condition for data access
	/// </summary>
	public interface IPredicate
	{
		/// <summary>
		/// Formats the predicate into a SQL friendly statement
		/// </summary>
		/// <returns>The SQL representation of the predicate</returns>
		string Format();
		/// <summary>
		/// Checks to see if the predicate already contains the field
		/// </summary>
		/// <param name="key">The field to check for</param>
		/// <returns>True if the predicate contains the specified field</returns>
		bool ContainsKey(string key);
		/// <summary>
		/// Gets the parameters and their values for the predicate
		/// </summary>
		/// <returns>A dictionary containing the paramaeter names and values</returns>
		Dictionary<string, string> GetParameters();
	}
}